<%@ page language="java" import="java.sql.*" pageEncoding="utf-8" errorPage="errorpage.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>更新车票</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" href="image/CSS.CSS" type="text/css">
<script language="javascript">
function check()
{
	  
  if((document.test.stationid1.value==null)||(document.test.stationid1.value.length==0))
  {   
    alert("站点1为空，请重新输入");
    document.test.stationid1.focus();
    return false;
  } 
	if((document.test.stationid2.value==null)||(document.test.stationid2.value.length==0))
  {   
    alert("站点2为空，请重新输入");
    document.test.stationid2.focus();
    return false;
  }
  if((document.test.distance.value==null)||(document.test.distance.value.length==0))
  {   
    alert("距离为空，请重新输入");
    document.test.distance.focus();
    return false;
  }            
  var txt = test.distance.value; 
  if(checknumber(txt)) 
    { 
        alert("距离只允许输入数字！"); 
        return false; 
    } 
  function checknumber(String) 
    { 
        var Letters = "1234567890"; 
        var i; 
        var c; 
        for( i = 0; i < String.length; i ++ ) 
        { 
			c = String.charAt( i ); 
			if (Letters.indexOf( c ) ==-1) 
			{ 
				return true; 
			} 
		} 
		return false; 
	} 
  return true;
}
</script>

  </head>
 <jsp:useBean id="sta_sta" scope="request" class="com.swjd.bean.sta_sta"/>
  <BODY BGCOLOR=#ffccCC leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--Logo|--开始-->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="330">
  <tr> 
    <td colspan="3" height="90"><img src="image/index_top1.gif" width="778" height="90"></td>
  </tr>
  <tr> 
    <td height="160" width="518" background="image/index_top2.gif">
      <table border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td> 
            <div align="center"><font color="#000000"> <b><font size="7"><font color="#000000">火车订票系统</font>

 
              </font></b></font></div>
          </td>
        </tr>
        
      </table>
    </td>
    <td height="160" width="210" background="image/01.gif"><img src="image/index_pic.gif" width="220" height="160"></td>
    <td height="160" width="40"><img src="image/index_top3.gif" width="40" height="160"></td>
  </tr>
  <tr> 
    <td colspan="3" height="80"><img src="image/index_top4.gif" width="778" height="80"></td>
  </tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr> 
    <td valign="top"> 
      <table width="280" border="0" cellspacing="0" cellpadding="0" background="image/index_lmbg.gif">
        <tr>
		<td align="center">
		</td>
		</tr>
		<tr>
		<td>
	<table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b><a href="changeadminpass.jsp">修改密码</a></b></div>
                </td>
              </tr>
            </table>
		</td>
		</tr>

		<tr> 
          <td height="30">
<table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="userinfo.jsp">
<!--Button1-->用户信息</a></b></div>
                </td>
              </tr>
</table>
            <table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="orderinfo.jsp">
订票信息</a></b></div>
                </td>
              </tr>
            </table>
            <table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="traininfo.jsp">
车次信息</a></b></div>
                </td>
              </tr>
            </table>
<table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="type.jsp">
<!--Button1-->火车类型</a></b></div>
                </td>
              </tr>
</table> 
<table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="station.jsp">
<!--Button1-->站点管理</a></b></div>
                </td>
              </tr>
</table>
<table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> 
                  <div align="center"><b>
<a href="sta_sta.jsp">
<!--Button1-->站站管理</a></b></div>
                </td>
              </tr>
</table>                       
            <table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              <tr> 
                <td> <div align="center"><b> 
<a href="logincheck?action=logout"> 
退出登录</a> </b></div></td>
              </tr>
            </table>
            <table width="250" border="0" cellspacing="0" cellpadding="0" height="40" background="image/index_lm.gif">
              
            </table>
			</td>
          <td width="30" height="30">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="2"> <img src="image/index_bottom.gif" width="280" height="100"></td>
        </tr>
      </table>
      <p>&nbsp;</p>
    </td>
    <td width="468" valign="top"> 
      <table width="458" border="0" cellspacing="0" cellpadding="0" style="width: 458px; height: 340px;" height="340">
        <tr> 
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td>
            <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
         
                
              <tr> 
                <td bgcolor="#000000"><img src="image/Spacer.gif" width="1" height="1"></td>
              </tr>
              <tr> 
                <td> 
                  <div align="right">

				  </div>
                </td>
              </tr>
              

  <%
String admin_id = (String)session.getId(); 
if(admin_id==null){response.sendRedirect("hello.jsp");}
%>


<p align="center"><font color="#000000" size="+1" face="方正舒体">新增站站信息</font></p>
<form  method="post" action="sta_stasvlt" name=test onSubmit="return check()">
  <input type="hidden" name="action" value="new">
  <table width="49%" height="50"  border="1" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="48%">站点1</td>
      <td width="52%"><input name="stationid1" type="text"  id="stationid1" ></td>
    </tr>
    <tr> 
      <td width="48%">站点2</td>
      <td width="52%"><input name="stationid2" type="text"  id="stationid2" ></td>
    </tr>
	<tr> 
      <td width="48%">距离</td>
      <td width="52%"><input name="distance" type="text"  id="distance" ></td>
    </tr>
    
  </table>
  <p align="center"> 
    <input type="submit" name="Submit" value="提交">
  </p>
</form>
<p>&nbsp;</p>
            </table> 
            <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" class="englishfont" height="1">
              <tr> 
                <td bgcolor="#000000"> </td>
              </tr>
            </table>
            <table width="96%" border="0" cellspacing="0" cellpadding="4" align="bottom">
              <tr> 
                <td> 
                  <div align="center"> 
火车在线订票
 ！
@2020<br>
                      车站地址:湖南省长沙市芙蓉区科教路<br>
                      电话:0731-8888888<br>
                      电子邮件:train@gmail.com
                </td>
              </tr>
            </table>      
		  </td>
        </tr>
      </table>

    </td>
    <td width="30">&nbsp;</td>
  </tr>
</table>
</BODY>
</html>
